//
//  KKImageLibrary.h
//  KKImagePickerController
//
//  Created by Mac mini on 16/1/21.
//  Copyright © 2016年 JuniorCodingPerson. All rights reserved.
//

#import "KKImagePickerController.h"

typedef void(^KKImageLibraryManagerAllGroupsHandle)(NSArray *groups);
typedef void(^KKImageLibraryManagerAllItemsOfGroupHandle)(NSArray *items);

@interface KKImageLibraryManager : NSObject

+ (instancetype)kk_defaultManager;

- (void)kk_searchAllGroupsFromLibrary:(KKImageLibraryManagerAllGroupsHandle)handle;

- (void)kk_searchAllItemsFromLibraryWithGroup:(ALAssetsGroup *)group result:(KKImageLibraryManagerAllItemsOfGroupHandle)handle;

@end


@interface KKImageLibraryGroupItem : NSObject

@property (nonatomic, strong) ALAssetsGroup *kk_assetsGroup;

@property (nonatomic, readonly) UIImage *kk_posterImage;
@property (nonatomic, readonly) NSString *kk_groupName;
@property (nonatomic, readonly) NSInteger kk_count;

- (instancetype)initWithAssetsGroup:(ALAssetsGroup *)assetsGroup;

@end